// 二叉节点
class BinaryNode {
    constructor(data = null, left = null, right = null) {
        this.data = data
        this.left = left
        this.right = right
    }
    // 判断节点是否为叶子节点
    isLeaf() {
        return this.left === null && this.right === null
    }
    // 返回描述字符串
    toString() {
        return this.data + ""
    }
}

module.exports = BinaryNode